package com.xbongbong.saas.domain.entity;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 
 * tb_saas_promotion_product
 * 
 * @author bomfish
 */
@Getter
@Setter
public class PromotionProductEntity implements Serializable {
    /**
     * 主键
     */
    private Long id;

    /**
     * 公司id
     */
    private String corpid;

    /**
     * 类型
     */
    private Integer businessType;
    /**
     * 关联活动id
     */
    private Long refId;
    /**
     * 数据
     */
    private JSONObject data;

    /**
     * 产品id
     */
    private Long productId;

    /**
     * 父产品id
     */
    private Long parentId;

    /**
     * 产品分类
     */
    private Long categoryId;

    /**
     * 优先级
     */
    private Integer priority;


    /**
     * 折扣
     */
    private Double discount;

    /**
     * 创建时间时间戳
     */
    private Long addTime;

    /**
     * 更新时间时间戳
     */
    private Long updateTime;

    /**
     * 删除标记
     */
    private Integer del;

    private static final long serialVersionUID = 1L;
    // 排序
    private Integer sort;


    public PromotionProductEntity() {
        this.del = 0;
        this.addTime = DateTimeUtil.getInt();
        this.updateTime = DateTimeUtil.getInt();
        this.discount = 10D;
    }
}